home *** CD-ROM | disk | FTP | other *** search
/ MACD 5 / MACD 5.bin / workbench / wb / czesc_3 / newiconsv3 / extras / include / libraries / newicon.h
C/C++ Source or Header  |  1996-07-06  |  3KB  |  78 lines

  1. #ifndef LIBRARIES_NEWICON_H
  2. #define LIBRARIES_NEWICON_H
  3.  
  4. #ifndef EXEC_LIBRARIES_H
  5. #include <exec/libraries.h>
  6. #endif
  7.  
  8. #ifndef WORKBENCH_WORKBENCH_H
  9. #include "workbench/workbench.h"
  10. #endif
  11.  
  12.  
  13. struct NewIconBase
  14. {
  15.     struct Library nib_Lib;
  16.     APTR nib_SegList;
  17.     LONG nib_Precision; /* precision when remapping images via */
  18.                 /* RemapChunkyImage(). Programs are not supposed */
  19.                 /* to modify this, it is a value chosen by the user */
  20.                 /* in the preferences. */
  21.     LONG nib_Flags; /* library base flags  */
  22.                 /* Again, programs are not supposed to modify this. (V38)*/
  23.     LONG nib_DPMode; /* Depth Promotion mode value. (V39) */
  24.                 /* Ditto */
  25. };
  26.  
  27.  
  28. #define NIFLG_DO_DITHER (1<<0)  /* use dithering when exact pen not available */
  29.  
  30. #define NIFLG_IS_DISABLED (1<<1) /* Commodity is disabled  (V39) */
  31.  
  32. #define NIFLG_RTGMODE     (1<<2) /* Use FastRAM when possible instead of CHIP)
  33.                                     (V39) */
  34.  
  35. #define NIFLG_NOBORDER   (1<<3) /* Won't display any border around icons,
  36.                                    and will also make them transparent.
  37.                                    (V39) */
  38.  
  39. /* Values for nib_DPMode (V39) */
  40.  
  41. #define NIDPM_NEVER     0       /* Do not depth promote old icons */
  42. #define NIDPM_WBONLY    1       /* Only promote icons opened by Workbench */
  43. #define NIDPM_ALL       2       /* Depth promote all old icons opened */
  44.  
  45. /*
  46.  * This structure contains an image in a format unusual to the Amiga: chunky
  47.  * pixel. We use this format because it is faster to remap to a given palette.
  48.  */
  49. struct ChunkyImage
  50. {
  51.     UWORD Width;        /* width of the image. Must be <= 93 */
  52.     UWORD Height;       /* height of the image. Must be <= 93 */
  53.     UWORD NumColors;    /* number of pens defined in the palette. Must be <= 256 */
  54.     UWORD Flags;        /* see defines below */
  55.     UBYTE *Palette;     /* array of RGB components of the pens (one byte per gun) */
  56.     UBYTE *ChunkyData;  /* Width*Height bytes storing the colors of the pixels */
  57. };
  58.  
  59. #define CIF_COLOR_0_TRANSP  (1<<0)  /* color 0 is transparent, not the one */
  60.                                     /* stored in palette */
  61.  
  62. #define CIF_DEFAULT         (1<<1)  /* when this bit is set, the image was */
  63.                                     /* obtained via the DEFAULTIMAGE ToolType, */
  64.                                     /* therefore it is not actually part of the */
  65.                                     /* icon and will not be stored in the */
  66.                                     /* ToolTypes on a PutNewDiskObject(). */
  67.  
  68.  
  69.  
  70. struct NewDiskObject
  71. {
  72.     struct DiskObject *ndo_StdObject;       /* The old-style icon */
  73.     struct ChunkyImage *ndo_NormalImage;    /* May be NULL, meaning no new style icon */
  74.     struct ChunkyImage *ndo_SelectedImage;  /* May be NULL, meaning no secondary image */
  75. };
  76.  
  77. #endif  /* LIBRARIES_NEWICON_H */
  78.